package com.example.demo.use;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service
@Scope("singleton")
public class SingletonScope {
    public SingletonScope(){
        // singleton单例模式
        //Spring 容器中有且只有一个Bean实例，只要Spring容器不销毁或退出，该Bean实例就会一直存活
    }
}
